<template>
  <div>
    <Category />
    <el-card
      shadow="always"
      :body-style="{ padding: '20px' }"
      style="margin-top: 30px"
    >
      <SpuList v-if="type === 0" />
      <SpuForm v-if="type === 1" />
      <SkuForm v-if="type === 2" />
    </el-card>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";
export default defineComponent({
  name: "Spu",
});
</script>

<script setup lang="ts">
import {ref} from "vue"
import SpuList from "./components/SpuList/index.vue";
import SpuForm from "./components/SpuForm/index.vue";
import SkuForm from "./components/SkuForm/index.vue"
// 控制当前展示的组件
const type = ref(0)
</script>

<style scoped></style>
